import Layout from '@/layout'

const familyRouter = {
  path: '/family-and-users',
  component: Layout,
  name: 'family-and-users',
  redirect: '/family-and-users/family/list',
  meta: {
    roles: [1, 2],
    title: '家庭&用户',
    icon: 'family-and-users'
  },
  children: [
    {
      path: 'family',
      component: () => import('@/views/PublicNested/index.vue'),
      name: 'family',
      meta: { title: '家庭管理', },
      redirect: '/family-and-users/family/list',
      children: [
        {
          path: 'list',
          component: () => import('@/views/family-and-users-management/family/list.vue'),
          name: 'family-list',
          hidden: true,
          meta: { title: '家庭列表', breadcrumb: false, activeMenu: '/family-and-users/family' },
        },
        {
          path: 'family-information',
          component: () => import('@/views/family-and-users-management/family/family-information.vue'),
          name: 'family-information',
          hidden: true,
          meta: { title: '家庭信息', activeMenu: '/family-and-users/family' },
        },
      ]
    },
    {
      path: 'user',
      component: () => import('@/views/PublicNested/index.vue'),
      name: 'user',
      meta: { title: '用户管理', },
      redirect: '/family-and-users/user/list',
      children: [
        {
          path: 'list',
          component: () => import('@/views/family-and-users-management/user/list.vue'),
          name: 'user-list',
          hidden: true,
          meta: { title: '用户列表', breadcrumb: false, activeMenu: '/family-and-users/user' },
        },
        {
          path: 'member',
          component: () => import('@/views/family-and-users-management/user/member.vue'),
          name: 'member',
          hidden: true,
          meta: { title: '用户信息', activeMenu: '/family-and-users/user' },
        },
      ]
    },
  ]
}
export default familyRouter
